﻿<%@ Page Language="C#" MasterPageFile="~/cms.master" AutoEventWireup="true" CodeFile="Users.aspx.cs"
    Inherits="Users" Title="<%$REsources:Language,CmsUsersTitle %>" %>

<%@ Register Src="~/controls/ctrlWait.ascx" TagName="ctrlWait" TagPrefix="ctrl" %>
<%@ Register Src="~/controls/ctrlShowInfo.ascx" TagName="ctrlShowInfo" TagPrefix="ctrl" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="Server">
    <h2>
        <%=Resources.Language.Users %></h2>
    <ctrl:ctrlWait ID="ctrlWait" runat="server" />
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <ctrl:ctrlShowInfo ID="CtrlShowInfo" runat="server" />
            <div id="dUsersList">
                <cc1:TabContainer runat="server" ID="tbcMainTabs" ActiveTabIndex="0" AutoPostBack="true"
                    OnActiveTabChanged="tbcMainTabs_ActiveTabChanged">
                    <cc1:TabPanel runat="server" ID="tabStaff" HeaderText="<%$Resources:Language,ShopService %>">
                    </cc1:TabPanel>
                    <cc1:TabPanel runat="server" ID="tabClients" HeaderText="<%$Resources:Language,ShopUsers %>">
                    </cc1:TabPanel>
                </cc1:TabContainer>
                <div id="UsersListContent">
                    <div class="vSeparate" id="dAddUser" runat="server">
                        <button onclick="window.location = 'AddUser.aspx' " style="display: inline;">
                            <%= Resources.Language.AddUser %></button>
                    
                    </div>
                    <fieldset  runat="server" id="fsFilter" visible="false">
                    <legend><%=Resources.Language.Filter %></legend>
                    <%=Resources.Language.LastName %>: <asp:TextBox ID="tbLastNameFilter" runat="server" />
                    <%=Resources.Language.Email %>: <asp:TextBox ID="tbEmailFilter" runat="server" />
                    <%=Resources.Language.Address %>: <asp:TextBox ID="tbAddressFilter" runat="server" />
                    <%=Resources.Language.AccountApproved%>: <asp:CheckBox ID="cbAccountApprovedFilter" runat="server" Checked="true"/>
                    <%=Resources.Language.AccountLocked%>: <asp:CheckBox ID="cbAccountLockedFilter" runat="server" />
                    <asp:Button ID="btnFilter" runat="server" Text="<%$Resources:Language, Filter %>" OnClick="btnFilter_Click"/>
                    </fieldset>
                    <div class="vSeparate">
                        <asp:GridView ID="gvUsers" class="cmsTables" runat="server" AutoGenerateColumns="False"
                            EnableViewState="False" OnRowDataBound="gvUsers_RowDataBound" AllowPaging="True"
                            OnPageIndexChanging="gvUsers_PageIndexChanging" PageSize="20" DataKeyNames="ProviderUserKey"
                            OnRowCommand="gvUsers_RowCommand">
                            <Columns>
                                <asp:BoundField DataField="Username" HeaderText="<%$Resources:Language, Login %>" />
                                <asp:BoundField DataField="Comment" HeaderText="<%$Resources:Language, Comment %>" />
                                <asp:BoundField DataField="CreationDate" HeaderText="<%$Resources:Language, CreationDate %>" />
                                <asp:BoundField DataField="LastLoginDate" HeaderText="<%$Resources:Language, LastLoginDate %>" />
                                <asp:BoundField HeaderText="<%$Resources:Language, AccountApproved %>" />
                                <asp:BoundField HeaderText="<%$Resources:Language, AccountLocked %>" />
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <a id="lnbShow" runat="server">
                                            <%= Resources.Language.Show %></a><br />
                                        <a id="lnbEdit" runat="server">
                                            <%= Resources.Language.Edit %></a><br />
                                        <a id="lnbOrder" runat="server">
                                            <%= Resources.Language.Orders %></a>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:ButtonField CommandName="unlock" Text="<%$Resources:Language,Unlock %>" />
                            </Columns>
                        </asp:GridView>
                    </div>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
